package org.example.book.strategy.context;

import org.example.book.factory.AbstractPayContext;
import org.example.book.state.pojo.Order;
import org.example.book.strategy.PayStrategyInterface;

public class PayContext extends AbstractPayContext {

    private PayStrategyInterface payStrategy;

    public PayContext(PayStrategyInterface payStrategy) {
        this.payStrategy = payStrategy;
    }

    @Override
    public String execute(Order order) {
        return this.payStrategy.pay(order);
    }
}
